import 'core-js/fn/promise'
import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store/index'
import Vodal from 'vodal'
import 'vodal/common.css'
import 'vodal/zoom.css'
import 'vue2-toast/lib/toast.css'
import Toast from 'vue2-toast'
import VueLazyLoad from 'vue-lazyload'
import api from './api'
import './common/configHttp.js'
import './common/deviceInfo'
import './common/rem'
import * as filters from './common/filters'
import './css/reset.css'
import './css/public.css'
import './css/animate.css'
import './directives/InputDelete'
import './directives/InputBlur'
import * as utils from './common/utils'
import VConsole from 'vconsole'
new VConsole();
Vue.config.productionTip = false

// 全局引入modal插件
Vue.component(Vodal.name, Vodal)

Vue.use(Toast, {
  type: 'center',
  duration: 3000,
  wordWrap: true,
  width: '200px'
})
// 图片懒加载{
Vue.use(VueLazyLoad, {
  loading: 'http://img.brandzw.com/skin/default/images/shareLogo.png'
})

// 全局滤镜
Object.keys(filters).forEach(key => {
  Vue.filter(key, filters[key])
})

// 后台api接口
Vue.use(api)

// 返回不刷新 针对低版本 ios
utils.backRefresh()

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')